<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<p>
</p>
<table width="700" border="1" cellspacing="1" cellpadding="1">
  <caption>
    THONG TIN ESTORE
  </caption>
<?php
		$hostname_connect = "localhost";
		$database_connect = "advertisement";
		$username_connect = "root";
		$password_connect = "";	
		$connect = mysql_pconnect($hostname_connect, $username_connect, $password_connect) or trigger_error(mysql_error(),E_USER_ERROR);
		mysql_query("set names 'utf8'");
?>
<?php
mysql_select_db($database_connect, $connect);
$query_detail = "SELECT `product`.`ProductID`, `subcategory`.`SubCategoryName`, `product`.`ProductName`, `product`.`Manufacturer`, `product`.`Image`, `product`.`Price`, `product`.`CreatedDate`, `product`.`Information`, `product`.`Waranty`, `product`.`SubCategoryID` FROM `product`,`subcategory` WHERE `product`.`SubCategoryID` = `subcategory`.`SubCategoryID`";
$detail = mysql_query($query_detail, $connect) or die(mysql_error());
$row_detail = mysql_fetch_assoc($detail);
$totalRows_detail = mysql_num_rows($detail);
?>
  <?php
        if (isset($row_detail) && is_array($row_detail)) {
          do { //Nested repeat
?>
<tr>
    <td rowspan="6" scope="col" align="center" width="300"><img width="100" height="100" src="<?php echo $row_detail['Image'];?>" alt=""></td>
    <td colspan="2" scope="col"><?php echo $row_detail['ProductName']; ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php echo $row_detail['Information']; ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php echo $row_detail['Manufacturer']; ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php echo $row_detail['Waranty']; ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php echo $row_detail['SubCategoryName']; ?></td>
  </tr>
  <tr>
    <td><?php echo $row_detail['CreatedDate']; ?></td>
    <td><?php echo $row_detail['Price']; ?></td>
  </tr>
<?php
		}
		  while ($row_detail = mysql_fetch_assoc($detail));
		}
?>
</table>
<p>&nbsp;</p>
<p>&nbsp; </p>
</body>
</html>